package com.lovo.sheyingback.bean.form;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

@Data
@Schema(title = "用户表单")
public class UserForm extends BaseForm{

    @NotBlank(message = "用户名不能为空")
    @Pattern(regexp = "^\\w{5,20}$",message = "用户名必须位字母、数字、下划线组成，范围6-20位")
    @Schema(title = "用户名",example = "admin")
    private String username;
//    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = "^.{6,}$", message = "密码最少6位")
    @Schema(title = "密码",example = "123456")
    private String pwd;
    @Schema(title = "平台类别ID(默认平台用户1000)",example = "1000")
    private Integer typeId;
    @Schema(title = "头像地址")
    private String head;
    @Schema(title = "角色id数组" ,example = "[]")
    private Integer [] roleIds;
    @Schema(title = "权限id数组" ,example = "[]")
    private Integer [] functionIds;
}
